﻿using Niti.OrderManage.OrderManage.Enum;
using System;
using System.Collections.Generic;
using System.Text;

namespace Niti.OrderManage.DTO
{
   public class OrderDto
    {
        /// <summary>
        /// 订单编号
        /// </summary>
        public string Code { get; set; }
        /// <summary>
        /// 订单的标题
        /// </summary>

        public string Title { get; set; }

        #region 供应商
        /// <summary>
        /// 供应商编号
        /// </summary>
        public string Supplier_Code { get; set; }
        /// <summary>
        /// 供应商名称
        /// </summary>

        public string Supplier_SName { get; set; }
        #endregion
        /// <summary>
        /// 订单商品种类的数量
        /// </summary>

        public int Count { get; set; }
        /// <summary>
        /// 订单商品总价
        /// </summary>

        public float TotalPrice { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreationTime { get; set; }
        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? UpdateTime { get; set; }

        /// <summary>
        /// 草稿状态 
        /// </summary>
        public OrderStatusCode IsDraft { get; set; }

        public virtual List<OrderLineItemDto> OrderLineItem { get; set; }
    }

   public class AddOrderDto
    {
        /// <summary>
        /// 订单编号
        /// </summary>
        public string Code { get; set; }
        /// <summary>
        /// 订单的标题
        /// </summary>

        public string Title { get; set; }

        #region 供应商
        /// <summary>
        /// 供应商编号
        /// </summary>
        public string Supplier_Code { get; set; }
        /// <summary>
        /// 供应商名称
        /// </summary>

        public string Supplier_SName { get; set; }
        #endregion

        public virtual List<OrderItemDto> OrderLineItem { get; set; }
    }




    public class ReceiptOrderDto
    {
        /// <summary>
        /// 采购订单编号
        /// </summary>
        public string Code { get; set; }
        /// <summary>
        /// 入库订单编号
        /// </summary>
        public string ReceiptCode { get; set; }
        /// <summary>
        /// 订单的标题
        /// </summary>

        public string Title { get; set; }
        #region 供应商
        /// <summary>
        /// 供应商编号
        /// </summary>
        public string Supplier_Code { get; set; }
        /// <summary>
        /// 供应商名称
        /// </summary>

        public string Supplier_SName { get; set; }
        #endregion
        /// <summary>
        /// 采购订单商品种类的数量
        /// </summary>
        public int Count { get; set; }
        /// <summary>
        /// 采购订单商品总价
        /// </summary>

        public float TotalPrice { get; set; }
        /// <summary>
        /// 入库订单商品种类的数量
        /// </summary>
        public int RealityCount { get; set; }
        /// <summary>
        /// 入库订单商品总价
        /// </summary>

        public float RealityTotalPrice { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreationTime { get; set; }
        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? UpdateTime { get; set; }
        /// <summary>
        /// 审核时间
        /// </summary>
        public DateTime? CheckTime { get; set; }
        /// <summary>
        /// 草稿状态 
        /// </summary>
        public OrderStatusCode IsDraft { get; set; } = OrderStatusCode.Draft;

        /// <summary>
        /// 订单明细
        /// </summary>
        public virtual List<ReceiptOrderLineItemDto> ReceiptOrderLineItem { get; set; }
    }
}
